home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 84
/
64er_Magazin_Sonderheft_84_19xx_Markt__Technik_de_Side_A.d64
/
modulgen. v2.0
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
8KB
|
249 lines
1 rem *** modulgenerator ***
2 rem 1987 by ruediger stahl
3 rem *** tiny eprommer ***
9 :
10 poke46,38:poke45,0:rem v.anf.
15 poke56,48:poke55,00:poke52,48:poke51,00:clr
20 m$=" bitte waehlen:":ei=16
30 ifpeek(49152)=32andpeek(49400)=169then50
40 print"[147] modulgenerator v2.0
41 [153]" by ruediger stahl":[153]" hurtenstr. 20"
42 [153]" 8138 frieding-andechs 1987
45 :load"ma.tiny eprommer",8,1
50 lm=49152:dr=49296:bl=49464:bs=49514:cl=49716
55 sys49768
100 poke53280,5:poke53281,0:poke650,0
110 syscl:print"[153]>>> tiny eprommer modulgenerator v2.0<<<";
120 print"----------------------------------------
130 [153]" bitte waehlen:
140 printtab(4)"'f1' = hauptmenue
145 [153][163]4)"'f3' = modulgenerator fuer
146 printtab(11)"ein programm
150 [153][163]4)"'f5' = modulgenerator fuer mehrere
151 printtab(11)"programme mit menueauswahl
155 [153][163]4)"'f7' = files/direktory
160 printtab(4)"'f2' = einschaltmeldung fuer modul-
161 [153][163]11)"programme mit menueauswahl
162 printtab(11)"aendern
165 [153][163]4)"'f4' = programm beenden
200 print"----------------------------------------";
210 print">>> modulgenerator v2.0 (8k/s.32768) <<[157]"chr$(148)"<";
260 geta$:ifa$=""then260
275 a=asc(a$):ifa<133ora>138then260
280 syscl:ona-132gosub1000,2200,2300,3000,2600,4000
390 goto100
999 rem untermenues
1000 print" hauptmenue wird nachgeladen
1010 [141]50050:[139]a$[178]"n"[167][142]
1020 [158]49816:[151]45,255:[151]46,46:[147]"tiny eprommer",8
2000 :
2010 [142]
2200 [153]"modulstartgenerator fuer ein programm"
2210 [140]:ad[178]32768:en[178]40960
2215 [135]a:[139]a[179]0[167]2220
2216 [151]ad,a:ad[178]ad[170]1:[137]2215
2220 z[178]ad[170]5:[141]2400:[141]2500
2221 [139]en[179]z[176]a[179][177]64[167]2000
2222 a[178]z:[158]49848,a[170]1,40960,255:[141]50500
2225 [151]ad[170]1,z[173]256:[151]ad,z[171][194](ad[170]1)[172]256
2226 [151]ad[170]3,an[173]256:[151]ad[170]2,an[171][194](ad[170]3)[172]256
2227 [151]ad[170]4,mo
2230 [158]cl
2240 [153]"programm steht von"
2245 [153]" $8000 bis $";a$;" im speicher"
2250 [141]50010
2260 [142]
2300 [153]"modulstartgenerator fuer mehrere pro-
2310 print"gramme
2315 [140]:ad[178]32768:en[178]40958:nu[178]0
2316 [135]a:[139]a[177][171]1[167]2316
2317 [135]a:[139]a[179]0[167]2320
2318 [151]ad,a:ad[178]ad[170]1:[137]2317
2320 [129]a[178]0[164][195](m$)[171]1:[151]ad[170]a,[198]([202](m$,a[170]1,1)[170]" "):[130]:[151]ad[170]a,0
2321 ad[178]ad[170]a[170]1
2325 [158]cl:z[178]ad[170]5:nu[178]nu[170]1:[141]2400
2326 [153]"programm nummer"nu":"
2327 [153]" name, unter dem das progrmm im menue
2328 print" erscheinen soll:"
2329 print" ";nu-1;"[157]. ";:ei=25:gosub50100
2330 ifa$="$"thensysdr:gosub50010:syscl:goto2326
2331 fora=1tolen(a$):pokez+a-1,asc(mid$(a$,a,1)+" "):next:pokez+a-1,0
2333 z=z+a:ifz>enthenpokead,0:pokead+1,0:print"speicher voll":goto2385
2334 syscl:gosub2400
2335 gosub2500
2336 ifz>enora<>64then2385
2340 pokead+1,z/256:pokead,z-peek(ad+1)*256
2341 pokead+3,an/256:pokead+2,an-peek(ad+3)*256
2342 pokead+4,mo
2345 pokez,0:pokez+1,0
2350 print"routine mit header steht von
2355 a[178]ad:[141]50500:[153]"$"a$" bis $";
2360 a[178]z[170]1:[141]50500:[153]a$" im speicher.
2380 ad=z:nu=nu+1:rem bei error 2385
2385 z=ad:nu=nu-1:print"noch ein prohramm ? (j/n)":gosub2400
2390 geta$:ifa$<>"j"anda$<>"n"then2390
2395 ifa$="j"then2325
2396 syscl:print"das gesamte modulstartprogramm liegt
2397 a[178]z[170]1:[158]49848,a[170]1,40960,255:[141]50500
2398 [153]"in dem bereich von $8000 bis $"a$".
2399 gosub50010:return
2400 a=en-z:gosub50500:print"maximale programmlaenge: $"a$" bytes.
2410 [153]"(entspricht ca."[181]((en[171]z)[173]256)"blocks)
2420 return
2500 print" bitte programmtyp waehlen:
2501 t$(0)[178]" programm mit basicstart "
2502 t$(1)[178]" maschinenprogramm (jmp ...) "
2503 t$(2)[178]"maschinenprogr. subrout. (jsr ...) "
2504 t$(3)[178]"daten nur transverieren, ohne start"
2505 t$(4)[178]" menuepunkt: zu basic springen "
2506 [153]" (mit crsr-tasten und return)
2510 ifmo>4thenmo=0
2511 ifmo<0thenmo=4
2512 print""
2515 fora=0to4:ifa=mothenprint"";
2516 print" ";t$(a);" ":next
2520 geta$:ifa$<>""anda$<>"[145]"anda$<>chr$(13)then2520
2521 ifa$="[145]"thenmo=mo-1:goto2510
2522 ifa$=""thenmo=mo+1:goto2510
2530 :
2535 syscl:ifmo<4then2540
2536 an=673:pokez,76:pokez+1,157:pokez+2,227:z=z+3
2537 ifen<zthenprint" programm zu lang !"
2538 mo=1:a=64:goto2590
2540 print"filename: ";:gosub50100
2545 n$=a$
2550 print"geraeteadresse: 8_[157]";:a$="8":gosub50120
2555 g=val(a$):ifg>15then2550
2556 ifg=8andn$="$"thensysdr:gosub50010:goto2535
2560 open1,g,0,n$
2561 get#1,a$:an=asc(a$+chr$(0)):get#1,a$:an=an+asc(a$+chr$(0))*256
2562 close1
2565 sysbl,n$,g,z
2570 z=peek(781)+peek(782)*256
2575 :
2580 ifz>enthenprint"programm zu lang !"
2585 a=st:gosub50600
2586 gosub50010
2590 :
2595 ifmo=0thenan=2049
2599 return
2600 print"einschaltmeldung veraendern:
2605 [153][163]6)"'f1' = zurueck
2610 printtab(6)"'del'= zeichen zuruecknehmen
2615 [141]50010
2620 [141]2650
2621 [161]a$:[139]a$[178]""[167]2621
2622 [139]a$[178]"input"[167][142]
2623 [139]a$[178][199](20)[167]m$[178][200](m$,[182]([195](m$)[171]1)):[137]2620
2624 [139][195](m$)[177]254[167]m$[178][200](m$,254)
2625 m$[178]m$[170]a$:[137]2620
2650 [153]"load *** commodore 64 basic v2 ***
2655 print" 64k ram system 38911 basic bytes free
2660 [153]m$;"_"
2665 [153]" 1. xxxxxxxxx
2670 return
3000 syscl
3015 print" bitte waehlen:"
3020 printtab(6)"'f1' = zurueck
3025 [153][163]6)"'f3' = direktory
3030 printtab(6)"'f5' = fehlerkanal
3035 [153][163]6)"'f7' = save close
3040 printtab(6)"'f2' = floppy-befehl [160]
3050 [161]a$:[139]a$[178]""[167]3050
3055 a[178][198](a$):[139]a[179]133[176]a[177]137[167]3050
3060 [158]cl
3065 [145]a[171]132[137] 3100,3200,3300,3400,3500
3100 [142]
3200 [158]dr
3210 [141]50010:[137]3000
3300 [141]50600:[141]50010:[137]3000
3400 [153]"speicherbereich absaven:
3410 print"filename:";:gosub50100:ifa$=""then3000
3415 n$=a$
3420 a$="8":print"geraeteadresse:8_[157]";:gosub50120
3430 g=val(a$):ifg>15thenprint"[145][145][145]":goto3420
3440 a$="8000":print"startadresse:";a$;"_[157]";:gosub50120
3445 gosub50400:b=a
3450 a$="9fff":print"endadresse :";a$;"_[157]";:gosub50120
3455 gosub50400
3456 a=a+1:ifa>65535thena=65535:print"letztes byte geht verlohren"
3460 gosub50050:ifa$="n"then3000
3470 sysbs,n$,g,b,a
3475 ifst<>0thenprint" i/o-error":gosub50010
3480 goto3000
3500 ei=25:print"floppy-befehl:";
3510 gosub50100:open1,8,15,a$:close1
3520 gosub50600:gosub50010:goto3000
4000 print"programm verlassen
4010 [141]50050:[139]a$[178]"n"[167][142]
4020 [128]:[138]
50000 :
50010 [151]198,0
50015 [139][194](214)[177]21[167][153]""
50020 [153]:[153]" t a s t e d r u e c k e n "
50030 [146]198,1,0:[151]198,0:[142]
50050 :
50060 [151]198,0
50070 [153]:[153]" a l l e s oclosek aclosey (j/n) ? wait"
50075 [146]198,1,0:[161]a$
50080 [139]a$[179][177]"j"[175]a$[179][177]"n"[175]a$[179][177]"_"[167]50075
50085 [142]
50100 a$[178]"":[153]"_cmd";
50120 [161]b$:[139]b$[179][177]""[167]50130
50122 [153]"_waitcmd";:[129]a[178]0[164]80:[130]
50125 [161]b$:[139]b$[179][177]""[167]50130
50127 [153]"_cmd";:[129]a[178]0[164]80:[130]:[137]50120
50130 [139][198](b$)[178]13[167][153]"_":ei[178]16:[142]
50140 [139][198](b$)[177]31[175][198](b$)[179]128[167]50200
50150 [139][198](b$)[177]161[167]50200
50160 [139]b$[179][177][199](20)[175]b$[179][177]"cmd"[167]50120
50170 [139][195](a$)[179]1[167]50120
50180 a$[178][200](a$,[195](a$)[171]1)
50190 [153]" cmdcmd_cmd";
50195 [137]50120
50200 [139][195](a$)[179]ei[167]50300
50210 [153]" cmdcmd";
50220 a$[178][200](a$,[195](a$)[171]1)
50300 a$[178]a$[170]b$:[153]b$;"_cmd";:[137]50120
50400 a[178][171]1:[139][195](a$)[177]4[176][195](a$)[179]1[167][142]
50420 [129]x[178]1[164][195](a$)
50430 z[178][198]([202](a$,x,1))
50440 [139]47[179]z[175]z[179]58[167]z[178]z[171]48:[137]50470
50450 [139]z[179]65[176]z[177]71[167]a[178][171]1:x[178]4:[130]:[142]
50460 z[178]z[171]55
50470 a[178]a[170]z[172]16[174]([195](a$)[171]x)
50490 [130]:a[178]a[170]1:[142]
50500 a$[178]"":[129]x[178]3[164]0[169][171]1:w[178][181](a[173]16[174]x)
50520 a[178]a[171]w[172]16[174]x:[139]w[177]9[167]w[178]w[170]7
50530 a$[178]a$[170][199](w[170]48)
50540 [130]:[142]
50600 [159]1,8,15:[153]"disk-status: ";
50610 [161]#1,a$:[153]a$;:[139](st [175]64)[178]0[167]50610
50630 [160]1:[142]
60000 [143] m. routinen
61000 [131]10,128,94,254,195,194,205,56,48,0,142,22,208,32,163,253,32,80,253,32
61001 [131]21,253,32,91,255,32,83,228,32,191,227,32,34,228,162,251,154,160,4,185
61002 [131]138,128,153,247,0,136,16,247,166,249,164,250,134,252,132,253,162,143
61003 [131]160,128,134,176,132,177,160,0,177,176,145,249,230,176,208,2,230,177
61004 [131]230,249,208,2,230,250,165,176,197,247,165,177,229,248,144,230,166,251
61005 [131]240,9,202,240,30,202,240,30,202,240,30,169,8,141,2,8,32,51,165,166
61006 [131]249,164,250,134,45,132,46,169,0,32,113,168,76,174,167,108,252,0,32
61007 [131]129,128,76,157,227,-1
62000 [131]10,128,94,254,195,194,205,56,48,0,142,22,208,32,163,253,32,80,253,32
62001 [131]21,253,32,91,255,32,83,228,32,191,227,169,0,141,17,208,32,34,228,162
62002 [131]251,154,160,0,185,31,129,240,6,32,210,255,200,208,245,200,152,24,105
62003 [131]31,133,180,169,129,105,0,133,181,162,0,32,249,128,240,39,169,10,133
62004 [131]211,230,214,134,173,32,108,229,166,173,138,105,47,32,210,255,169,46
62005 [131]32,210,255,230,211,232,160,5,177,176,240,218,32,210,255,200,208,246
62006 [131]134,173,169,27,141,17,208,32,228,255,56,233,48,144,248,197,173,176
62007 [131]244,170,32,249,128,160,0,177,176,153,247,0,200,192,5,208,246,165,249
62008 [131]133,252,165,250,133,253,200,177,176,208,251,200,152,24,101,176,133
62009 [131]176,165,177,105,0,133,177,160,0,177,176,145,249,230,176,208,2,230,177
62010 [131]230,249,208,2,230,250,165,176,197,247,165,177,229,248,144,230,166,251
62011 [131]240,9,202,240,30,202,240,30,202,240,30,169,8,141,2,8,32,51,165,166
62012 [131]249,164,250,134,45,132,46,169,0,32,113,168,76,174,167,108,252,0,32
62013 [131]240,128,76,31,128,134,172,162,0,165,180,133,176,165,181,133,177,160
62014 [131]1,177,176,240,16,228,172,240,12,72,136,177,176,133,176,104,133,177
62015 [131]232,208,234,166,172,168,96,-1
63000 [143] *** ende ***